{{- define "image_pull_secret" }}
{{- printf "{\"auths\": {\"%s\": {\"username\": \"%s\",\"password\": \"%s\", \"auth\": \"%s\"}}}" .Values.image_registry.addr .Values.image_registry.user .Values.image_registry.passwd (printf "%s:%s" .Values.image_registry.user .Values.image_registry.passwd | b64enc) | b64enc }}
{{- end }}

{{- define "images.qascript_platform_api_test_image" }}
{{- if eq .Values.cpu_mode "amd64" -}}
{{- print .Values.images_amd64.qascript_platform_api_test_image }}
{{- else if eq .Values.cpu_mode "arm64" -}}
{{- print .Values.images_arm64.qascript_platform_api_test_image }}
{{- end -}}
{{- end }}
{{- define "images.skiff_ops_tools_images" }}
{{- if eq .Values.cpu_mode "amd64" -}}
{{- print .Values.images_amd64.skiff_ops_tools_images }}
{{- else if eq .Values.cpu_mode "arm64" -}}
{{- print .Values.images_arm64.skiff_ops_tools_images }}
{{- end -}}
{{- end }}